<h1>New chapter</h1>

<% form_for(@chapter, :url => book_chapter_path(@chapter.book, @chapter)) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :order %><br />
    <%= f.text_field :order %>
  </p>
  <p>
    <%= f.label :num_of_pages %><br />
    <%= f.text_field :num_of_pages %>
  </p>
  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>

<%= link_to 'Back', book_chapters_path(@chapter.book) %>
